package proto;


import javafx.async.RunnableFuture;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author vvivien
 */
public class CounterTaskFuture implements RunnableFuture{
    private long v0;
    private long v1;

    public CounterTaskFuture(long startValue, long endValue){
        v0 = startValue;
        v1 = endValue;
    }

    
    @Override
    public void run() throws Exception {
        System.out.println ("Starting Counter at " + v0);
        long i = v0;
        for(i = v0; i <= v1; i++) {
            System.out.println ("i = " + i);
            Thread.currentThread().sleep(20);
        }
        System.out.println ("Finish Counting value = " + i);
    }
}
